﻿using System;
using UnityEngine;
using UnityEngine.UI;

public class UIProgressBar : Singleton<UIProgressBar>
{
    [SerializeField]
    private Image m_fillImage;
    [SerializeField]
    private Text m_titleText;

    public static void Clear()
    {
        Singleton<UIProgressBar>.Instance.gameObject.SetActive(false);
    }

    public static void Show(string title, float progress)
    {
        Singleton<UIProgressBar>.Instance.gameObject.SetActive(true);
        Singleton<UIProgressBar>.Instance.m_titleText.text = title;
        Singleton<UIProgressBar>.Instance.m_fillImage.fillAmount = progress;
    }
}

